package com.qf.device.controller;

import com.qf.device.Dto.DriverMqttDto;
import com.qf.device.service.DeviceService;
import com.qf.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 完成设备的认证
 */
@RestController
@CrossOrigin
public class DeviceAuthController {

    @Autowired
    private DeviceService deviceService;


    @PostMapping("/device/auth")
    public R<DriverMqttDto> auth(@RequestBody DriverMqttDto driverMqttDto){


        return deviceService.auth(driverMqttDto);
    }

}
